//
//  PKRadioDetailCell.m
//  AMomentApp
//
//  Created by lanou on 15/10/4.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "PKRadioDetailCell.h"
#import "UIImageView+WebCache.h"
@implementation PKRadioDetailCell

-(void)setRadioDetailModel:(PKRadioDetailModel *)radioDetailModel
{
    _radioDetailModel = radioDetailModel;
    self.titleLabel.text = radioDetailModel.title;
    self.visitLabel.text = radioDetailModel.musicVisit;
    [self.pictureView sd_setImageWithURL:[NSURL URLWithString:radioDetailModel.coverimg]];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _pictureView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 10, 50, 50)];
        [self.contentView addSubview:_pictureView];
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(80, 5, SCREEN_WIDTH-120, 30)];
        [self.contentView addSubview:_titleLabel];
        
        _visitLabel = [[UILabel alloc]initWithFrame:CGRectMake(80, 40, SCREEN_WIDTH-70, 20)];
        _visitLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_visitLabel];
        
        _musicView = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-30, 30, 20, 20)];
        _musicView.image = [UIImage imageNamed:@"start"];
        [self.contentView addSubview:_musicView];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
